let html=document.getElementById("midPlan-html").innerHTML;
let css=document.getElementById("midPlan-css").innerHTML;
let JavaScript=document.getElementById("midPlan-js").innerHTML;
//选择全部
function selectAll(){
    let length=document.getElementsByClassName("midPlan").length;
    for(var x=0;x<length;x++){
        let a="plan-".concat(x)
        document.getElementById(a).style.display="block";
    }
};
//方法
let judge=function(dom){
    let length=document.getElementsByClassName("midPlan").length;
    for(var x=0;x<length;x++){
        let a="plan-".concat(x)
        let selectedhtml =document.getElementById(a).getElementsByTagName("span");
        if(selectedhtml.length===1){
            var y=0
            if(selectedhtml[y].innerHTML!==dom){
                document.getElementById(a).style.display="none";
            } 
        }else{
            for(var y=0;y<selectedhtml.length;y++){
                if(selectedhtml[y].innerHTML!==dom){
                    if(y+1===selectedhtml.length){
                        document.getElementById(a).style.display="none";
                    }
                }else{
                    break;
                }
            }
        }
    }
}
//选择只有html
function selectHtml(){
    selectAll();
    judge(html);
};
//选择只有css
function selectCss(){
    selectAll();
    judge(css);
};
//选择只有js
function selectJs(){
    selectAll();
    judge(JavaScript);
};